# Maintainer: George Rawlinson <grawlinson@archlinux.org>
# Contributor: Justin Vreeland <vreeland.justin@gmail.com>
# Contributor: Mike Javorski (javmorin) <mike.javorski gmail com>
# Contributor: Johannes Dewender   arch at JonnyJD dot net

pkgname=python-debian
pkgver=0.1.49
pkgrel=2
pkgdesc='Python module to work with Debian-related data formats'
arch=('any')
url='https://salsa.debian.org/python-debian-team/python-debian'
license=('GPL')
depends=(
  'python'
  'python-chardet'
  'python-six'
)
makedepends=(
  'git'
  'python-build'
  'python-installer'
  'python-wheel'
  'python-setuptools'
)
checkdepends=('python-pytest')
_commit='23f50416fce5ee7f1590b3ad1a49ec52e2e986d7'
source=("$pkgname::git+$url.git#commit=$_commit")
b2sums=('SKIP')

pkgver() {
  cd "$pkgname"

  git describe --tags
}

build() {
  cd "$pkgname"

  python -m build --wheel --no-isolation
}

check() {
  cd "$pkgname"

  pytest -v
}

package() {
  cd "$pkgname"

  python -m installer --destdir="$pkgdir" dist/*.whl
}
